/**
 * Created by fangzehua on 2017/7/4.
 */
$(function () {
    alert("aaaaa");
    $('#lmMemberTable').bootstrapTable({
        url: "member_list",
        search: false,
        pagination: true,
        showRefresh: false,
        showToggle: false,
        showColumns: false,
        pageSize:15,
        height:600,
        iconSize: 'outline',
        toolbar: '#productTableEventsToolbar',
        columns:[
            {
                field:'uuid',
                title:'id'
            },
            {
                field:'taobaonick',
                title:'昵称'
            },
            {
                field:'mobile',
                title:'账户',
                width:180
            },
            {
                field:'invitation',
                title:'代理数',
                width:60
            },
            {
                field:'invitation',
                title:'本月推广'
            },
            {
                field:'invitation',
                title:'本月分成'
            },
            {
                field:'invitation',
                title:'代理推广'
            },
            {
                field:'invitation',
                title:'代理提成'
            },
            {
                field:'platform',
                title:'设备'
            },
            {
                field:'addtime',
                title:'注册时间'
            },
            {
                field:'uptime',
                title:'登录时间'
            },      {
                field:'action',
                title:'操作',
                width:180,
                formatter: function(value, row, index) {
                    return [
                        '<shiro:hasPermission name="admin:ordervip:update">'+
                        '<a class="edit ml10" href="javascript:void(0)" title="修改">'+
                        '<i class="glyphicon glyphicon-edit"></i></a></shiro:hasPermission>&nbsp;&nbsp;&nbsp;&nbsp;',
                        '<shiro:hasPermission name="admin:ordervip:plus">'+
                        '<a class="plus ml12" href="javascript:void(0)" title="参数">'+
                        '<i class="glyphicon glyphicon-plus"></i></a></shiro:hasPermission>&nbsp;&nbsp;&nbsp;&nbsp;',
                        '<shiro:hasPermission name="admin:ordervip:clear">'+
                        '<a class="delete ml12" href="javascript:void(0)" title="删除">'+
                        '<i class="glyphicon glyphicon-remove-circle"></i></a></shiro:hasPermission>'
                    ].join('');
                },    //紫色为添加图标（icon），插件：font-awesome，效果图见底部。
                events: {
                    'click .delete': function(e, value, row, index) {
                        alert("暂无权限删除商品!");
                    },
                    'click .edit': function(e, value, row, index) {
                       // window.location.href="doEditor/"+row.uuid;
                    },
                    'click .plus': function(e, value, row, index) {
                      //  window.location.href="product/"+row.uuid;
                    }
                }
            },
        ]
    });


});